import { get, post } from '../utils/request';

module.exports = {
  list: (data) => {
    return get('order', data)
  },

  confirm: (data) => {
    return post('order/confirm', data)
  },

  create: (data) => {
    return post('order/create', data)
  },

  close: (id) => {
    return post('order/close', {
      id: id
    })
  },

  receive: (id) => {
    return post('order/receive', {
      id: id
    })
  },
  
  remove: (id) => {
    return post('order/remove', {
      id: id
    })
  },

  detail: (id) => {
    return get('order/detail', {
      id: id
    })
  },

  comment: (id, data) => {
    return post('order/comment', {
      id: id,
      data: data
    })
  },

  code: (id) => {
    return get('order/code', {
      id: id
    })
  },

  fetch: (id) => {
    return post('order/fetch', {
      id: id
    })
  }
}
